<?php
$properties = array(
	'id'=>'device-form',
	'enableAjaxValidation'=>false,
	'focus'=>array($model, 'sequence'),
);
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', $properties);
?>

<p class="help-block">
	Fields with <span class="required">*</span> are required.
</p>

<?php
echo $form->errorSummary($model);

$htmlOptions = array('class'=>'span5');
echo $form->textFieldRow($model, 'sequence', $htmlOptions);

$htmlOptions = array('class'=>'span5', 'maxlength'=>255);
echo $form->textFieldRow($model, 'name', $htmlOptions);
?>

<div class="form-actions">
	<?php
	$properties = array(
		'buttonType'=>'submit',
		'type'=>'primary',
		'label'=>$model->isNewRecord ? 'Create' : 'Save',
	);
	$this->widget('bootstrap.widgets.TbButton', $properties);
	?>
</div>

<?php $this->endWidget(); ?>
